import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;
import javax.swing.border.Border;

public class SouthPanel extends JPanel
{
	private GrafOrientat graf;
	private JButton buton;
	private JButton buton2;
	private JButton buton3;
	private JLabel label;
	private JLabel label2;
	private JLabel label3;
	
	@SuppressWarnings("deprecation")
	public SouthPanel(GrafOrientat graf)
	{
		this.graf=graf;
		buton=new JButton("Parcurgere BF");
		label=new JLabel("Se va afisa parcurgerea...");
		buton2 = new JButton("Parcurgere Generica");
		label2 = new JLabel("Se va afisa parcurgerea...");
		buton3=new JButton("Parcurgere DF");
		label3 = new JLabel("Se va afisa parcurgerea...");
		
		
		//add(buton);
		//add(label);
		//add(buton2);
		//add(label2);
		//add(buton3);
		//add(label3);
		
		buton.addActionListener(new ActionListener()
		{

			@Override
			public void actionPerformed(ActionEvent arg0)
			{
				AlgoritmPTBF alg = new AlgoritmPTBF();
				String s = alg.getParcurgere(SouthPanel.this.graf);
				label.setText(s);
			}
			
		});
		
		buton2.addActionListener(new ActionListener() 
		{
			public void actionPerformed(ActionEvent e) 
			{
				AlgoritmPTG alg = new AlgoritmPTG();
				String s = alg.getParcurgere(SouthPanel.this.graf);
				label2.setText(s);
			}
		});
		
		buton3.addActionListener(new ActionListener() 
		{
			
			public void actionPerformed(ActionEvent arg0) {
				AlgoritmPTDF alg = new AlgoritmPTDF();
				String s = alg.getParcugerePTDF(SouthPanel.this.graf);
				label3.setText(s);
			}
		});
	}
	
}
